Completion Trigger
ActiveBatch provides the ability for a Job or Plan to trigger another Job or Plan after it completes. This is called a completion trigger. For example, when JobA completes successfully, it can be configured to automatically trigger JobB. This scenario is made possible by configuring a completion trigger on JobA, to trigger JobB.
You can determine which Jobs or Plans to trigger based on how your Job or Plan completes. This means you can trigger one set of Jobs if your Job completes successfully and another set if your Job fails. Multiple completion triggers can be configured on any given Job or Plan. As another example, when JobA completes successfully, it can trigger JobB and JobC at the same time, to run in parallel.
To add a completion trigger, access the properties of the Job or Plan that you wish to add the trigger to. Select the Completion property sheet. In the Triggers section, you will see a list of completion triggers, if any have been configured. Click the Add button to add a trigger. The completion dialog will appear, as depicted in the image below.
Job/Plan to trigger is where you select, from the dropdown list of objects, the Job or Plan you wish to trigger. Only ActiveBatch Trigger enabled Jobs are presented for selection. Select a Job or Plan from the list. Move on to the Trigger On: portion of the dialog.
Success means to trigger the Plan/Job if the Plan/Job completed successfully.
Failure means to trigger the Plan/Job if the Plan/Job didn’t complete successfully.
Exit Code(s) means to trigger the Plan/Job based on one or more exit code specifications. You can specify a single value, a series of values and/or a range of values (variable substitution is not supported).
Note: An exit code with a value of -1071120348 represents a Job with an ActiveBatch "Lost" status. Lost means the following points are true:
-
Scheduler to Agent connectivity is disrupted (a disconnect occurred).
-
The Job is not configured to "Restart" or "Restart and Failover" (these are Job properties).
-
When the Scheduler to Agent connectivity is resumed, the Agent is unable to tell the Job Scheduler what happened to the Job. This can happen when the Agent system is rebooted, or the Agent application stops running and is not started again until after the Job completes.
Since triggering another Job or Plan is possible based on exit code, you can use the -1071120348 exit code to trigger another object should this code be returned.
Abort means to trigger the Plan/Job if the Plan/Job was aborted.
Click OK to confirm and apply the completion trigger. Your trigger is then added to the list.
Note: You can also manage (add/modify/delete) completion triggers Using the Map View